
import { http } from "..";
import { urlData } from "../config";

export const getAllContent = () => {
  return http(urlData.content, { method: "Get" });
};

export const addContent = (data: { [key: string]: unknown }) => {
  return http(urlData.content, { method: "Post", data });
};

export const updateContent = (data: { [key: string]: unknown }) => {
  return http(`${urlData.content}/${data.id}`, { method: "PUT", data });
};
export const deleteContent = (id:number) => {
  return http(`${urlData.content}/${id}`, { method: "delete" });
};
